import request from '@/utils/request'

// 查询拜访目标列表
export function listObjectives(query) {
  return request({
    url: '/crm/objectives/list',
    method: 'get',
    params: query
  })
}

// 查询拜访目标详细
export function getObjectives(visitObjectivesId) {
  return request({
    url: '/crm/objectives/' + visitObjectivesId,
    method: 'get'
  })
}

// 新增拜访目标
export function addObjectives(data) {
  return request({
    url: '/crm/objectives',
    method: 'post',
    data: data
  })
}

// 修改拜访目标
export function updateObjectives(data) {
  return request({
    url: '/crm/objectives',
    method: 'put',
    data: data
  })
}

// 删除拜访目标
export function delObjectives(visitObjectivesId) {
  return request({
    url: '/crm/objectives/' + visitObjectivesId,
    method: 'delete'
  })
}
